import allure
from appium.webdriver.common.appiumby import AppiumBy

from src.day42.PO.xueqiu import XueQiu


class SearchResultsPage(XueQiu):
    __SEARCH_PRICE=(AppiumBy.XPATH,"//*[@resource-id='com.xueqiu.android:id/current_price_dtv']")
    def search_price(self):
        with allure.step("找到股票【阿里巴巴】的股票价格 price"):
            ele =self.find(*self.__SEARCH_PRICE)
            return float(ele.text)



